<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "action_record".
 *
 * @property int $id
 * @property string $admin_id 操作人id
 * @property string $ip ip地址
 * @property string $request_url 请求地址
 * @property string $controller_id 控制器
 * @property string $action_id 方法
 * @property string $post_data 参数
 * @property int $created_at
 */
class ActionRecord extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'action_record';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['request_url', 'post_data'], 'string'],
            [['created_at'], 'integer'],
            [['admin_id'], 'string', 'max' => 255],
            [['ip', 'controller_id', 'action_id'], 'string', 'max' => 32],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'admin_id' => 'Admin ID',
            'ip' => 'Ip',
            'request_url' => 'Request Url',
            'controller_id' => 'Controller ID',
            'action_id' => 'Action ID',
            'post_data' => 'Post Data',
            'created_at' => 'Created At',
        ];
    }
}
